//
//  YXPartnerCell.m
//  CreditCard
//
//  Created by 杨旭 on 2017/12/23.
//  Copyright © 2017年 杨旭. All rights reserved.
//

#import "YXPartnerCell.h"

@interface YXPartnerCell ()
@property (weak, nonatomic) IBOutlet UIImageView *picImageView;
@property (weak, nonatomic) IBOutlet UILabel *nameLab;
@property (weak, nonatomic) IBOutlet UILabel *certificationLab;
@property (weak, nonatomic) IBOutlet UILabel *numberLab;
@property (strong, nonatomic) IBOutlet UIButton *phoneBtn;
@end

@implementation YXPartnerCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    self.picImageView.layer.masksToBounds = YES;
    self.picImageView.layer.cornerRadius = self.picImageView.W / 2;
}

- (void)setModel:(YXUserInfoModel *)model {
    _model = model;
    _nameLab.text = [NSString stringWithFormat:@"姓名：%@",_model.name];
    _certificationLab.text = [NSString stringWithFormat:@"是否认证：%@",_model.certification];
    [_picImageView sd_setImageWithURL:[NSURL URLWithString:_model.imgUrl] placeholderImage:[UIImage imageNamed:@"logo"]];
    _numberLab.text = [NSString stringWithFormat:@"合伙人：%@人",_model.nextAgentCounts];
}
- (IBAction)phoneBtnAction:(UIButton *)sender {
    
    if (self.clickPhoneBtnBlock) {
        self.clickPhoneBtnBlock(self, self.model);
    }
}

@end
